# SPDX-FileCopyrightText: 2023-2025 Sangfor Technologies Inc.
# SPDX-License-Identifier: Mulan PSL v2
#!/bin/bash

# 本文件是在CICD开始的时候运行的，可以定义一些环境变量等操作

export DOCKER_IMAGE_TAG="${VERSION}_${CI_COMMIT_SHA:0:8}_${date}"
export DOCKER_IMAGE_NAME=registry.ai.geniusai.com/ai-sangfor/notebook-manager:${DOCKER_IMAGE_TAG}

mkdir -p /var/run/secrets/kubernetes.io/serviceaccount/
\cp -af cicd/serviceaccount/* /var/run/secrets/kubernetes.io/serviceaccount/

mkdir /matrix/etc/conf/ -p
\cp -af pkg/config/application-test.yaml /matrix/etc/conf/application.yaml